const index = {
  state: {
    headpic: "", // 头像
    nickname: "", // 昵称
    account: "", // 账号
    sex: 0, // 性别
    assetType: 0, // 账户类型，1：标准账户，2：融资账户
    accountType: 2, // 当前账户类型， 1: A股通, 2：港股，3：美股
    countryCode: "", // 区号
    tradePass: 0, // 是否存在交易密码,0：不存在，1：存在
    realName: "", // 真实姓名
    isNew: null, //1：不是第一次登录  0 ：第一次登录
    isOpen: null, //
    openAccountUrl: '',//开户链接,
    stockInfo: {}, // 股票信息
    stockMoreInfo: {}, // 股票更多信息
    level: {}, // 股票等级
    financeQuestion: {}, // 融资融券信息
    StockData: {
      currency: "",
      symbol: "",
      market: "", // 美股：US  港股：HKEX
      securityType: 1, //股票：1 指数：2
    },//股票参数
    hkActive: false, // 港股列表右侧弹出框
    shActive: false, // 沪深列表右侧弹出框
    usActive: false, // 美股列表右侧弹出框
    zixuanActive: false, // 自选列表右侧弹出框
    ObserveStrock: {}, // account_right的原先值，用于右侧显示后跳回行情中心后显示原先值
    listenTrade: {
      flag: false, // 股票交易完成后刷新开关
      type: 0,
    },// 监视股票交易,1:刷新A股账号，2：刷新港股，3：刷新美股
    EarlyWarningNum: 0,
    closeOpen: true, // 点击账号信息打开隐藏
  },
  mutations: {
    setHeadpic(state, status) { //自定义改变state初始值的方法，这里面的参数除了state之外还可以再传额外的参数(变量或对象);
      state.headpic = status;
    },
    setNickname(state, status) { //同上
      state.nickname = status;
    },
    setAccount(state, status) {
      state.account = status;
    },
    setAccountType(state, status) {
      state.accountType = status;
    },
    setTradePass(state, status) {
      state.tradePass = status;
    },
    setAssetType(state, status) {
      state.assetType = status;
    },
    setSex(state, status) {
      state.sex = status;
    },
    setCountryCode(state, status) {
      state.countryCode = status;
    },
    setRealName(state, status) {
      state.realname = status;
    },
    isNewChange(state, status) {
      state.isNew = status;
    },
    setIsOpen(state, status) {
      state.isOpen = status;
    },
    OpenAccountUrlChanage(state, status) {
      state.openAccountUrl = status;
    },
    setStock(state, status) {
      state.stockInfo = status;
    },
    setStockMore(state, status) {
      state.stockMoreInfo = status;
    },
    setLevel(state, status) {
      state.level = status;
    },
    setFinanceQuestion(state, status) {
      state.financeQuestion = status;
    },
    setStockData(state, status) {
      state.StockData = status;
    },
    setHkActive(state, status) {
      state.hkActive = status
    },
    setShActive(state, status) {
      state.shActive = status
    },
    setUsActive(state, status) {
      state.usActive = status
    },
    setZixuanActive(state, status) {
      state.zixuanActive = status
    },
    setObserveStrock(state, status) {
      state.ObserveStrock = status
    },
    setListenTrade(state, status) {
      state.listenTrade = status
    },
    setEarlyWarningNum(state, status) {
      state.EarlyWarningNum = status
    },
    setCloseOpen(state, status) {
      state.closeOpen = status
    }
  },
  actions: {
    SetHeadpic(context, status) { //自定义触发mutations里函数的方法，context与store 实例具有相同方法和属性
      context.commit('setHeadpic', status);
    },
    SetNickname(context, status) {
      context.commit('setNickname', status);
    },
    SetAccount(context, status) {
      context.commit('setAccount', status)
    },
    SetAccountType(context, status) {
      context.commit('setAccountType', status)
    },
    SetTradePass(context, status) {
      context.commit('setTradePass', status)
    },
    SetAssetType(context, status) {
      context.commit('setAssetType', status)
    },
    SetSex(context, status) {
      context.commit('setSex', status)
    },
    SetCountryCode(context, status) {
      context.commit('setCountryCode', status)
    },
    SetRealName(context, status) {
      context.commit('setrealname', status)
    },
    IsNewChange(context, status) {
      context.commit('isNewChange', status)
    },
    SetIsOpen(context, status) {
      context.commit('setIsOpen', status)
    },
    OpenUrl(context, status) {
      context.commit('OpenAccountUrlChanage', status)
    },
    SetStock(context, status) {
      context.commit('setStock', status)
    },
    SetStockMore(context, status) {
      context.commit('setStockMore', status)
    },
    SetLevel(context, status) {
      context.commit('setLevel', status)
    },
    SetFinanceQuestion(context, status) {
      context.commit('setFinanceQuestion', status)
    },
    SetStockData(context, status) {
      context.commit('setStockData', status)
    },
    SetHkActive(context, status) {
      context.commit('setHkActive', status)
    },
    SetShActive(context, status) {
      context.commit('setShActive', status)
    },
    SetUsActive(context, status) {
      context.commit('setUsActive', status)
    },
    SetZixuanActive(context, status) {
      context.commit('setZixuanActive', status)
    },
    SetObserveStrock(context, status) {
      context.commit('setObserveStrock', status)
    },
    SetListenTrade(context, status) {
      context.commit('setListenTrade', status)
    },
    SetEarlyWarningNum(context, status) {
      context.commit('setEarlyWarningNum', status)
    },
    SetCloseOpen(context, status) {
      context.commit('setCloseOpen', status)
    }
  }
}
export default index